package com.cisetech.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cisetech.mapper.bobocai.LCustomerMessageMapper;
import com.cisetech.service.LCustomerMessageService;
import com.cisetech.vo.Page;
import com.cisetech.vo.bobocai.LCustomerMessage;

@Service
public class LCustomerMessageServiceImpl implements LCustomerMessageService{
	@Autowired
	LCustomerMessageMapper customerMessageMapper;
	
	@Override
	public Page<LCustomerMessage> getList(LCustomerMessage customerMessage) {
		Page<LCustomerMessage> page = new Page<LCustomerMessage>();
		if(customerMessage!=null && customerMessage.getPageNo()>0){
			customerMessage.setCalculationPge((customerMessage.getPageNo()-1)*customerMessage.getPageSize());
		}
		List<LCustomerMessage> list = customerMessageMapper.getList(customerMessage);
		Integer i = customerMessageMapper.findListCount();
		page.Pagehtml(customerMessage.getPageNo(), customerMessage.getPageSize(), i, list);
		return page;
	}

	@Override
	public void delete(List<LCustomerMessage> ids) {
		customerMessageMapper.delete(ids);
	}

}
